﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Swoosh.Contracts.MediaPlayerLib
{    
    [Serializable]
    public class Playlist
    {
        private List<PlaylistItem> _Items;            
	    [XmlIgnore]
        public List<PlaylistItem> Items
	    {
            get { return _Items; }
            set { _Items = value; }
	    }	
        
        private PlaylistItem _Current;
        [XmlIgnore]
        public PlaylistItem Current
        {
            get { return _Current; }
            set { _Current = value; }
        }

        public Playlist()
        {
            _Items = new List<PlaylistItem>();
            _Current = null;
        }
    }

    public class PlaylistItem
    {
        private int _Position;
        public int Position
        {
            get { return _Position; }
            set { _Position = value; }
        }

        private string _Label;
        public string Label
        {
            get { return _Label; }
            set { _Label = value; }
        }

        private string _File;
        public string File
        {
            get { return _File; }
            set { _File = value; }
        }

        private int _SeekTime; 
        /// <summary>
        /// position of the current item in seconds
        /// </summary>
        public int SeekTime
        {
            get { return _SeekTime; }
            set { _SeekTime = value; }
        }

        private bool _IsCurrent;
        public bool IsCurrent
        {
            get { return _IsCurrent; }
            set { _IsCurrent = value; }
        }        

        public PlaylistItem()
        {
            _Position = 0;
            _SeekTime = 0;
            _Label = "";
            _File = "";
        }
    }
}
